/*
 * lineas.fx
 *
 * Created on 23-dic-2009, 16:13:49
 */

package ProgramSamples.Graphics.Lineas;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.*;
import javafx.scene.paint.Color;
import javafx.scene.Group;


def stroke = Color.DARKSLATEGRAY;

def delta = 70;

Stage {
    title: "Line Styles"
    scene: Scene {
            fill: Color.LINEN;
            width: 250
            height: 300
            content: [
                Group{
                    translateY:30
                    content:[
                        Line {
                            startX: 10
                            startY: 20
                            endX: 80
                            endY: 20
                            stroke: stroke
                            strokeWidth: 10.0
                            strokeLineCap: StrokeLineCap.ROUND
                        },
                        Line {
                            translateX: 2 * delta
                            startX: 10
                            startY: 20
                            endX: 80
                            endY: 20
                            stroke: stroke
                            strokeWidth: 10.0
                            strokeLineCap: StrokeLineCap.SQUARE
                        }//Line
                    ]
                },//Group
                Group{
                    translateY:40
                    content: [

                        Path {
                            stroke: bind stroke
                            strokeWidth: 10.0
                            strokeLineJoin: StrokeLineJoin.BEVEL
                            elements: [
                                MoveTo {x: 10 y: 100 },
                                LineTo {x: 50 y: 120},
                                LineTo{x:90 y: 100}
                            ]
                        },
                        Path {
                            translateX: 2 * delta
                            stroke: bind stroke
                            strokeWidth: 10.0
                            strokeLineJoin: StrokeLineJoin.MITER
                            elements: [
                                MoveTo {x: 10 y: 100 },
                                LineTo {x: 50 y: 120},
                                LineTo{x:90 y: 100}
                            ]
                        }
                    ]
                },//Group
                Group{
                    translateY: 120
                    content: Path {
                            translateX: delta
                            stroke: bind stroke
                            strokeWidth: 10.0
                            strokeLineJoin: StrokeLineJoin.ROUND
                            elements: [
                                MoveTo {x: 10 y: 100 },
                                LineTo {x: 50 y: 120},
                                LineTo{x: 90 y: 100}
                            ]
                        }

                }//Group
            ]
        }//Scene
}//Stage
